import sys
import os
from cx_Freeze import setup, Executable


PYTHONDIR = 'D:\\NEO-GUI-Runtime-Win64-py310\\Python310\\Python310'
#PYTHONDIR = 'F:\\Python36'
# PYTHON_DLL = PYTHONDIR + '\\DLLs\\'
os.environ['TCL_LIBRARY'] = PYTHONDIR + '\\tcl\\tcl8.6'
os.environ['TK_LIBRARY'] = PYTHONDIR + '\\tcl\\tk8.6'

 
# base 实际上默认就是 None，即命令行程序，除非需要构建图形界面程序，否则配置了反而是画蛇添足,这里不配置
base = None
# 判断Windows系统
# if sys.platform == 'win32':
#     base = 'Win32GUI'
 
executables = [
    Executable(
        'bom_compare_v3.py',
        targetName='bom_compare_v3.exe',
        icon="BOM.ico",
        base=base)
]
 
include_files = [
    r'D:\\NEO-GUI-Runtime-Win64-py310\\Python310\\Python310\\DLLs\\tcl86t.dll',
    r'D:\\NEO-GUI-Runtime-Win64-py310\\Python310\\Python310\\DLLs\\tk86t.dll',
    r'BOM_README.TXT',
]
 
buildOptions = dict(
    packages=['openpyxl'],
    excludes=['pytest', 'wx', 'scipy', 'pandas', 'numpy', 'notebook', 'nbformat', 'nbconvert', 'qtpy', 'PIL'],
    include_files=include_files,
)

 
setup(
    name='bom ',
    version='1.0',
    description='bom compare, neophotonics',
    options=dict(build_exe=buildOptions),
    executables=executables)